<?php
namespace app\services\yuql;

class RedisServices{

    private static $instance = null;
    private $redis = null;
    private function __construct()
    {
        $this->redis = new \Redis();
        $this->redis->connect('127.0.0.1', 6379);
    }
    public static function getInstance()
    {
        if (is_null(self::$instance)) {
            self::$instance = new RedisServices();
        }
        return self::$instance;
    }
    public function getRedis()
    {
        return $this->redis;
    }

}